package com.zheng.pvz.view.plants
{
	import com.zheng.pvz.action.IAction;
	import com.zheng.pvz.action.SendAttack;
	import com.zheng.pvz.data.DataConst;
	import com.zheng.pvz.view.PlantLandAttack;
	
	import flash.display.DisplayObjectContainer;
	import com.zheng.pvz.model.proxy.PlantProxy;
	import com.zheng.pvz.model.vo.PlantVo;
	import flash.geom.Point;
	
	/**
	 * 豌豆 
	 * 使用普通的子弹做攻击
	 * @author zheng
	 * 
	 */
	public class PlantPea extends PlantLandAttack
	{
		public function PlantPea(contain:DisplayObjectContainer,plantProxy:PlantProxy){
			//设置关心领域
			PlantVo(plantProxy.vo).areaOfInterest=[new Point(plantProxy.row+1,plantProxy.cols),new Point(plantProxy.row+2,plantProxy.cols),
				new Point(plantProxy.row+3,plantProxy.cols)];
			//action 方式为子弹攻击
			var sendAttack:IAction=new SendAttack();
			super(contain,plantProxy);
			
			//添加对象的行为
			this.addAction(sendAttack);
			//添加对象显示内容
			this.addStatus(DataConst.STATUS_NORMAL,new PeaNormal);
			this.addStatus(DataConst.STATUS_SEND,new PeaSend);
		}
	}
}